/**
 * Copyright (c) Huawei Technologies Co., Ltd. 1987-2021. All rights reserved.
*/

package com.gitee.fufu669.utils;

import org.junit.Test;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * TODO
*/
public class Temp {

    @Test
    public void get(){
        String temp =
        "T_activity                     \n" +
        "T_blacklist                    \n" +
        "T_comment                      \n" +
        "T_comment_reply                \n" +
        "T_courseware                   \n" +
        "T_customer_service             \n" +
        "T_daily_payment                \n" +
        "T_daily_statistics             \n" +
        "T_exchange_log                 \n" +
        "T_experiment_basic             \n" +
        "T_experiment_category          \n" +
        "T_experiment_courseware        \n" +
        "T_experiment_info              \n" +
        "T_experiment_level             \n" +
        "T_experiment_link              \n" +
        "T_experiment_product           \n" +
        "T_experiment_progress          \n" +
        "T_experiment_report            \n" +
        "T_experiment_report_detail     \n" +
        "T_experiment_status            \n" +
        "T_experiment_status_log        \n" +
        "T_experiment_step              \n" +
        "T_experiment_substep           \n" +
        "T_experiment_tips              \n" +
        "T_experiment_topology          \n" +
        "T_experiment_type              \n" +
        "T_experiment_user_report       \n" +
        "T_free_quota                   \n" +
        "T_heartbeat_generator          \n" +
        "T_message                      \n" +
        "T_message_status               \n" +
        "T_olblab_bills                 \n" +
        "T_olblab_instance              \n" +
        "T_olblab_order                 \n" +
        "T_olblab_spot_product          \n" +
        "T_olblab_user_balance          \n" +
        "T_product                      \n" +
        "T_recommend                    \n" +
        "T_related_experiment           \n" +
        "T_statistic_new_user           \n" +
        "T_user_basic                   \n" +
        "T_user_consumption             \n" +
        "T_user_control                 \n" +
        "T_user_info                    \n" +
        "T_user_login_log               \n" +
        "T_user_payment_log             \n" +
        "T_user_role                    \n" +
        "T_user_times                   \n" +
        "T_whitelist                    \n" +
        "Te_courseware_certificate      \n" +
        "Te_courseware_chapter          \n" +
        "Te_courseware_checkls          \n" +
        "Te_courseware_grayscale        \n" +
        "Te_courseware_intro            \n" +
        "Te_courseware_relate           \n" +
        "Te_courseware_status           \n" +
        "Te_courseware_subsystem_type   \n" +
        "Te_courseware_training         \n" +
        "Te_courseware_user_certificate \n" +
        "Te_lecturer_group              \n" +
        "Te_obsabandoning               \n" +
        "Te_service_gateway             ";
        System.out.println(temp
        .replace("_a","A")
        .replace("_b","B")
        .replace("_c","C")
        .replace("_d","D")
        .replace("_e","E")
        .replace("_f","F")
        .replace("_g","G")
        .replace("_h","H")
        .replace("_i","I")
        .replace("_j","J")
        .replace("_k","K")
        .replace("_l","L")
        .replace("_m","M")
        .replace("_n","N")
        .replace("_o","O")
        .replace("_p","P")
        .replace("_q","Q")
        .replace("_r","R")
        .replace("_s","S")
        .replace("_t","T")
        .replace("_u","U")
        .replace("_v","V")
        .replace("_w","W")
        .replace("_x","X")
        .replace("_y","Y")
        .replace("_z","Z")
        );
    }

    @Test
    public void renameFile() {
        File directory = new File("D:\\windowslockphoto");
        File[] files = directory.listFiles();
        int i = 1;
        for (File fileInThisDirectory : files) {
            fileInThisDirectory.renameTo(new File("D:\\windowslockphoto\\" + i + ".jpg"));
            i += 1;
        }
    }

}

